home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 17 code / TapBoard / Project Data < prev    next >
Encoding:
Text File  |  1993-10-23  |  993 b   |  24 lines  |  [TEXT/NTP1]

  1. // Who we are:
  2. constant kAppSymbol := '|TapBoard:Chesley|;
  3. constant kPackageName := "TapBoard:Chesley";
  4.  
  5. // Each square on the board can be empty, contain a newton piece, or contain
  6. // a user piece; for the convenience of the computer move algorithms, the
  7. // board array is made one square larger in each directions and the edges are
  8. // filled in with a special value (0). Also note that if p is one player, -p is
  9. // the other player. These constants are also used to indicate whose turn it is.
  10. constant kEmptySquare := nil;
  11. constant kNewtonPiece := -1;
  12. constant kUserPiece := 1;
  13. constant kBoardEdge := 0;
  14. constant kTieWinner := 0;
  15.  
  16. RemoveScript := func(packageFrame)
  17. begin
  18.    local cursor := Query(GetStores()[0]:GetSoup(ROM_SystemSoupName),
  19.                            {type: 'index, indexPath: 'tag, startKey: kPackageName,
  20.                             validTest: func(item) StrEqual(item.tag, kPackageName)});
  21.    if cursor:Entry() <> nil then
  22.       EntryRemoveFromSoup(cursor:Entry());
  23. end;
  24.